//package com.jic.market.controller.after;
//
//import com.jic.common.base.vo.RestResult;
//import com.jic.market.api.after.GrouponApi;
//import com.jic.market.common.exception.MarketErrorCodeEnum;
//import com.jic.market.common.exception.MarketException;
//import com.jic.market.request.rest.groupon.*;
//import com.jic.market.response.rest.groupon.*;
//import com.jic.market.service.rest.groupon.GrouponRestService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.annotation.Resource;
//
///**
// * @author xuyongliang
// * @version V1.0
// * @className GrouponRestController
// * @description 拼团 rest 接口
// * @date 2020/4/2
// */
//@RestController
//@RequestMapping("/api/groupon")
//@Api(tags = {"拼团内部接口"})
//@Slf4j
//public class GrouponApiController implements GrouponApi {
//
//    @Resource
//    private GrouponRestService grouponRestService;
//
//    @Override
//    @PostMapping("/launch-or-join-groupon")
//    @ApiOperation("开参团活动H5")
//    public RestResult<LaunchOrJoinGrouponResponse> launchOrJoinGroupon(@RequestBody LaunchOrJoinGrouponRequest request) {
//        log.info("------开参团活动H5--参数为:{}-----",request);
//        LaunchOrJoinGrouponResponse innerResult = null;
//        try {
//            innerResult = grouponRestService.launchOrJoinGroupon(request);
//        }catch (MarketException e){
//            log.error("开参团活动异常",e);
//            return RestResult.error(e.getCode(),e.getMessage());
//        }catch (Exception e){
//            log.error("开参团活动未知异常",e);
//            return RestResult.error(MarketErrorCodeEnum.GROUP_LAUNCH_JOIN.getCode(),e.getMessage());
//        }
//        return RestResult.success(innerResult);
//    }
//    @PostMapping("/getMyGroupCount")
//    @ApiOperation("查询我的拼团数量")
//    public RestResult getMyGroupCount(Long userId) {
//        return RestResult.success(grouponRestService.getMyGroupCount(userId)) ;
//    }
//}